import { request } from "@/utils/service"
import type * as obj from "./types/instructor"
import { IdForm, SelectData, type PageForm } from "../common/common"

export function getTableDataApi(data: PageForm) {
  return request<obj.TableList>({
    url: "/mp/instructor/list",
    method: "get",
    params: data
  })
}

export function getSelectDataApi() {
  return request<SelectData[]>({
    url: "/mp/instructor/select",
    method: "get"
  })
}

export function saveTableDataApi(data: obj.CreateOrUpdateTableRequestData) {
  return request<string>({
    url: "/mp/instructor/save",
    method: "post",
    data
  })
}

export function deleteTableDataApi(data: IdForm) {
  return request<string>({
    url: "/mp/instructor/delete",
    method: "post",
    data
  })
}
